package ipad.asia.dao;

import ipad.asia.entity.SeckillOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.stereotype.Repository;

import javax.persistence.LockModeType;
import java.util.List;

@Repository
public interface SecKillOrderDao extends JpaRepository<SeckillOrder,Long> {
//     @Lock(LockModeType.PESSIMISTIC_WRITE)
     List<SeckillOrder> findByConsumerIdAndProductId(int consumerId, int productId);
}
